import { Gender } from '@type/common';
import { IsString, IsInt, MinLength, MaxLength, Allow, validate, Contains, IsIn, IsOptional } from 'class-validator';
import { Type, Transform, Expose } from "class-transformer";
import { StringHelper } from '@utils/string.helper';

export class LoginForm {
    @IsString()
    @Transform(({ value }) => StringHelper.trim(value))
    username: string;
    @IsString()
    @Transform(({ value }) => StringHelper.trim(value))
    password: string;
    @IsOptional()
    isSavePassword: boolean = false;
}